package com.ihrm.employee.client;


import com.ihrm.common.entity.Result;
import com.ihrm.domain.system.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient("ihrm-system")
public interface SystemFeignClient {
    /**
     * 更新用户
     */
    @RequestMapping(value = "/system/user", method = RequestMethod.PUT)
    public Result update(@RequestBody User user);

    /**
     * 根据id查询单个用户
     */
    @RequestMapping(value = "/system/user/{id}", method = RequestMethod.GET)
    public Result findById(@PathVariable(value = "id") String id);

    /**
     * 根据id查询单个用户
     */
    @RequestMapping(value = "/system/userById/{id}", method = RequestMethod.GET)
    public User findUserById(@PathVariable(value = "id") String id);

}
